<script setup lang="ts">
import localeStore from '@/store/locale'
import { storeToRefs } from 'pinia'
const { localeInfo} = storeToRefs(localeStore())
const router = useRouter()
function onRouteBtnClick() {
  router.push('/FormEmail')
}
</script>

<template>
  <div class="endoscopy">
     <div class="img_txt">
      <img class="maxwidth_img" src="@/assets/img/animal/17.jpg" alt="">
        <p>
          <span>{{localeInfo.endoscopy.txt}}</span>
          <span>{{localeInfo.endoscopy.txt1}}</span>
        </p>
     </div>
      <div class="content">
        <div class="c">
          <p v-for="(item,index) in localeInfo.endoscopy.desc" :key="index" :class="[index==5?'margintop20':'']">{{item}}</p>
        </div>
        <img src="@/assets/img/medical/Endoscopy.png" alt="">
      </div>
      <div class="btn">
      <p>{{localeInfo.endoscopy.btnDesc}}</p>
      <p @click="onRouteBtnClick">
        <span>{{localeInfo.endoscopy.btntxt}}</span>
      </p>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.endoscopy{
  
  .img_txt{
    position: relative;
    img{
      width: 100%;
    }
    // p{
    //   position: absolute;
    //   top: 0;
    //   right: 0;
    //   padding:2px 4px;
    //   background-color: rgba(203,204,203,0.5);
    //   span{
    //     display: block;
    //      font-weight: bolder;
    //      font-weight: 10PX;
    //      color: #FFF;
    //     &:nth-child(1) {
    //       margin-bottom: 25PX;
    //       font-size: 30PX;
    //       line-height: 30PX;
    //     }
    //   }
    // }
    p{
      width: 50%;
      position: absolute;
      top: 0;
      right: 0;
      padding:2px 4px;
      background-color: rgba(203,204,203,0.5);
      // text-align: center;
      span{
         display: block;
         font-weight: bolder;
         font-weight: 10PX;
         color: #FFF;
         font-size: 15px;
         line-height: 30px;
        &:nth-child(1) {
          margin-bottom: 25PX;
          font-size: 20px;
          line-height: 40px;
        }
      }
    }
  }
 
  .content{
    position: relative;
    .c{
      width: 80%;
    }
    div{
      padding: 10PX 0 0 10PX;
      p{
        font-size: 14PX;
        color: #666;
        display: inline-block;
      }
    }
    img{
      width: 20%;
      position: absolute;
      top: -40px;
      right: 0px;
    }
  }
 .btn{
      background-color: rgba(242,242,242,0.5);
      padding: 25px 0 15px 0;
      display: flex;
      display: -webkit-flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin-bottom: 5PX;
      p{
        &:nth-child(1){
          color: #333;
          font-size: 16px;
          margin-bottom: 15px;
        }
        &:nth-child(2) {
          span{
            background-color: rgba(252,13,27,1);
            text-align: center;
            padding: 8PX 20PX;
            font-size: 8PX;
            color: #FFF;
            border-radius: 4PX;
          }
        }
      }
    }
}
</style>
